package com.bnq.logc.printer

interface LogcPrinter {
    fun isEnabled():Boolean
    fun print(message:String)
}

interface PrinterCloseable{
    fun close()
}

class DelayLogcPrinter(private val createPrinter: ()->LogcPrinter):LogcPrinter{

    private val mPrinter: LogcPrinter by lazy {
        createPrinter()
    }

    override fun isEnabled(): Boolean = mPrinter.isEnabled()

    override fun print(message: String) = mPrinter.print(message)

}